//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================

#if _MSC_VER > 1000
#pragma once
#endif

#if !defined(_CFILEOPS_H_)
#define _CFILEOPS_H_

#include <fat.h>
#include <fatfile.h>

ECode FGetType(
    struct node *pNode,
    /* [out] */ FileType *pType);

ECode FGetAccessTime(
    class CFatFile *pFile,
    /* [out] */ Int32 * pTime);

ECode FSetAccessTime(
    class CFatFile *pFile,
    /* [in] */ Int32 time);

ECode FGetModificationTime(
    class CFatFile *pFile,
    /* [out] */ Int32 * pTime);

ECode FSetModificationTime(
    class CFatFile *pFile,
    /* [in] */ Int32 time);

ECode FGetCreateTime(
    class CFatFile *pFile,
    /* [out] */ Int32 * pTime);

ECode FCheckAccessMode(
    class CFatFile *pFile,
    /* [in] */ FileAccessMode mode);

ECode FGetAccessMode(
    class CFatFile *pFile,
    /* [out] */ FileAccessMode * pMode);

ECode FSetAccessMode(
    class CFatFile *pFile,
    /* [in] */ FileAccessMode mode);

ECode FGetShareMode(
    class CFatFile *pFile,
    /* [out] */ FileShareMode *pMode);

ECode FSetShareMode(
    class CFatFile *pFile,
    /* [in] */ FileShareMode mode);

ECode FSetStat(
    class CFatFile *pFile,
    /* [in] */ UInt32 mode,
    /* [in] */ UInt32 atime,
    /* [in] */ UInt32 mtime,
    /* [in] */ UInt32 ctime,
    /* [in] */ UInt32 size,
    /* [in] */ UInt64 blocks,
    /* [in] */ UInt32 blksize);

ECode FGetStat(
    class CFatFile *pFile,
    /* [out] */ UInt32 * pMode,
    /* [out] */ UInt32 * pAtime,
    /* [out] */ UInt32 * pMtime,
    /* [out] */ UInt32 * pCtime,
    /* [out] */ UInt32 * pSize,
    /* [out] */ UInt64 * pBlocks,
    /* [out] */ UInt32 * pBlksize);

#endif //_CFILEOPS_H_
